/PROG  PNS0001
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0282075/2077";
PROG_SIZE	= 3961;
CREATE		= DATE 22-05-23  TIME 08:41:48;
MODIFIED	= DATE 25-02-25  TIME 21:22:50;
FILE_NAME	= PNS0073;
VERSION		= 0;
LINE_COUNT	= 145;
MEMORY_SIZE	= 4437;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0072 ;
   7:  !  PART:P0282075/2077  ;
   8:  !ZYL2022.5.23******************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  //R[5:SPEED]=10    ;
  24:  R[32:CYCLE COUNT]=0    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  PAUSE ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:  JMP LBL[5] ;
  33:   ;
  34:  LBL[5] ;
  35:  PR[6:PICK POSTION]=PR[9:PNS72 PS]    ;
  36:  R[32:CYCLE COUNT]=0    ;
  37:  JMP LBL[10] ;
  38:   ;
  39:  !***DO NOT RUN THIS LBL8*** ;
  40:  LBL[8] ;
  41:  PR[7:PNS70 PS]=PR[6:PICK POSTION]    ;
  42:   ;
  43:  LBL[10:TOP OF LOOF] ;
  44:   ;
  45:  TIMER[3]=STOP ;
  46:  TIMER[2]=STOP ;
  47:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  48:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  49:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  50:  R[8:R MOVE TIME]=TIMER[3]    ;
  51:  TIMER[2]=RESET ;
  52:  TIMER[2]=START ;
  53:  TIMER[3]=RESET ;
  54:   ;
  55:  !PROCEED TO PICK ;
  56:  LBL[20] ;
  57:   ;
  58:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[38:RL SAFETY POS]=ON AND DI[8:P1 PICK START]=ON AND DI[40:PART IN PRS]=ON,JMP LBL[25] ;
  59:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  60:  JMP LBL[20] ;
  61:   ;
  62:  LBL[25:GOTO PICK] ;
  63:  TIMER[3]=START ;
  64:  R[32:CYCLE COUNT]=R[32:CYCLE COUNT]+1    ;
  65:  DO[38:R12 SAFETY POS]=OFF ;
  66:J P[3:PICK APPROACH] 100% CNT30 ACC100    ;
  67:L P[4] 1000mm/sec CNT0 DB   80.0mm,DO[41:SecondAirON]=PULSE,1.5sec    ;
  68:L P[4] 1000mm/sec CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  69:  PAYLOAD[4] ;
  70:  CALL CHK_PICK    ;
  71:  MONITOR Z_CHECH ;
  72:L P[5:UPPER] 800mm/sec CNT60 ACC100    ;
  73:   ;
  74:J P[7:PICK CLEAR] 100% CNT50 ACC100    ;
  75:  DO[5:TO RL1 DROP START]=PULSE,1.0sec ;
  76:  DO[38:R12 SAFETY POS]=ON ;
  77:  DO[8:P1 PARTS OUT]=PULSE,1.0sec ;
  78:  LBL[30:GOTO DROP POUNCE] ;
  79:J P[8:DROP POUNCE] 95% CNT100 ACC90 BREAK    ;
  80:  TIMER[3]=STOP ;
  81:   ;
  82:  IF DI[39:Single BLANK]=ON,JMP LBL[40] ;
  83:  JMP LBL[27] ;
  84:  LBL[27:DROP D BLANK] ;
  85:J P[18] 50% CNT100 ACC100    ;
  86:  MONITOR END Z_CHECH ;
  87:J P[15:DROP DOUBLE] 20% CNT0 ACC100 TB R[19]sec,CALL PARTDROP BREAK    ;
  88:J P[16] 50% CNT100 ACC100 TA   0.00sec,DO[39:DBlankReset]=PULSE,1.0sec    ;
  89:  PR[6,3:PICK POSTION]=PR[6,3:PICK POSTION]-1.5    ;
  90:J P[2:PICK POUNCE] 100% CNT70 ACC100    ;
  91:  IF DI[40:PART IN PRS]=OFF,JMP LBL[86] ;
  92:  JMP LBL[20] ;
  93:   ;
  94:  LBL[40:AT DROP POUNCE] ;
  95:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  96:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  97:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  98:  JMP LBL[40] ;
  99:   ;
 100:  LBL[50:MOVE DROP SNEAK] ;
 101:  TIMER[3]=START ;
 102:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
 103:  LBL[51:DROP OR C-P-S] ;
 104:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
 105:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
 106:  JMP LBL[51] ;
 107:   ;
 108:  LBL[60:MOVE CLS-PRS-ACC] ;
 109:J P[1:MIDDLE] 50% CNT100 ACC100    ;
 110:  PAUSE ;
 111:  JMP LBL[30] ;
 112:   ;
 113:  LBL[80:DROP ENABLED] ;
 114:  TIMER[3]=START ;
 115:  !PROCEED TO DROP ;
 116:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
 117:  MONITOR END Z_CHECH ;
 118:J P[11:DROP] 100% CNT0 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 119:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 120:  PAYLOAD[3] ;
 121:  CALL CHK_DROP    ;
 122:   ;
 123:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 124:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 125:  !GOTO PICK POUNCE ;
 126:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 127:  IF DI[40:PART IN PRS]=OFF,JMP LBL[89] ;
 128:  JMP LBL[89] ;
 129:   ;
 130:  LBL[86:P1 ADC START] ;
 131:  DO[22:P1_ADC START]=PULSE,3.0sec ;
 132:  JMP LBL[89] ;
 133:  LBL[89] ;
 134:   ;
 135:   ;
 136:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 137:  JMP LBL[10] ;
 138:   ;
 139:  LBL[90:END OF CYCLE] ;
 140:  TIMER[1]=STOP ;
 141:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 142:J P[1:MIDDLE] 50% CNT100    ;
 143:  MOVE TO HOME    ;
 144:   ;
 145:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1320.321  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2162.015  mm,	Y =  1575.890  mm,	Z =  -786.371  mm,
	W =   179.441 deg,	P =      .436 deg,	R =   142.049 deg,
	E1=   142.100 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2566.605  mm,	Y =  2587.746  mm,	Z =  -786.143  mm,
	W =   173.261 deg,	P =    -6.246 deg,	R =   105.164 deg,
	E1=   180.848 deg
};
P[4]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2566.654  mm,	Y =  2587.646  mm,	Z =  -909.734  mm,
	W =   174.635 deg,	P =    -6.611 deg,	R =   105.009 deg,
	E1=   180.845 deg
};
P[5:"UPPER"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2566.606  mm,	Y =  2587.747  mm,	Z =  -701.982  mm,
	W =   173.261 deg,	P =    -6.246 deg,	R =   105.164 deg,
	E1=   180.848 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1863.841  mm,	Y =  1483.514  mm,	Z =  -878.800  mm,
	W =   179.509 deg,	P =      .286 deg,	R =   136.610 deg,
	E1=   147.644 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2005.770  mm,	Y = -1173.341  mm,	Z =  -837.872  mm,
	W =  -179.530 deg,	P =      .624 deg,	R =  -154.211 deg,
	E1=    78.520 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2233.081  mm,	Y = -2502.112  mm,	Z = -1011.013  mm,
	W =  -179.315 deg,	P =      .355 deg,	R =  -130.797 deg,
	E1=    56.682 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2721.255  mm,	Y = -3325.274  mm,	Z = -1034.284  mm,
	W =  -178.746 deg,	P =    -8.974 deg,	R =   -88.993 deg,
	E1=    14.265 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2721.252  mm,	Y = -3325.276  mm,	Z = -1138.443  mm,
	W =  -178.746 deg,	P =    -8.974 deg,	R =   -88.994 deg,
	E1=    14.265 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2721.253  mm,	Y = -3325.275  mm,	Z = -1046.684  mm,
	W =  -178.746 deg,	P =    -8.974 deg,	R =   -88.993 deg,
	E1=    14.265 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2064.434  mm,	Y = -1287.327  mm,	Z =  -899.117  mm,
	W =  -179.493 deg,	P =      .586 deg,	R =  -151.481 deg,
	E1=    75.955 deg
};
P[15:"DROP DOUBLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1755.919  mm,	Y =   127.757  mm,	Z = -1830.000  mm,
	W =   179.837 deg,	P =      .546 deg,	R =  -179.811 deg,
	E1=   195.476 deg
};
P[16]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1884.268  mm,	Y =  1109.538  mm,	Z = -1088.794  mm,
	W =   179.631 deg,	P =      .439 deg,	R =   156.630 deg,
	E1=   167.003 deg
};
P[18]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1861.632  mm,	Y =    33.521  mm,	Z = -1430.825  mm,
	W =   179.915 deg,	P =      .626 deg,	R =  -178.808 deg,
	E1=   172.239 deg
};
/END
